<?php /* УТФ-8:fix */

class SPIview__json extends SPIview__dummy
{
    public function render( & $content )
    {
        $is_any_files_uploaded = SPI::I('var')->get_files_count() > 0;

        echo ( $is_any_files_uploaded ? '<textarea>' : '' )
           . SPIc::I('json')->encode( $content )
           . ( $is_any_files_uploaded ? '</textarea>' : '' )
           ;

        return true;
    }
}
